package com.hd.openapi.web.cotenollen;

import com.hd.openapi.common.ResponseResult;
import com.hd.openapi.common.ResultTable;
import com.hd.openapi.entity.ApiSystemparam;
import com.hd.openapi.servies.sysser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/sys")
public class systconllen {
    @Autowired
    private sysser ss;

    @RequestMapping("/table")
    public ResultTable table(@RequestParam(defaultValue = "1") Integer page,
                             @RequestParam(defaultValue = "10") Integer limit,
                             String name,String state){
        return ss.getdata(page,limit,name,state);
    }
    @RequestMapping("/del")
    public ResponseResult del(Integer[] ids){
        return ss.deldata(ids);
    }
    @RequestMapping("/add")
    public ResponseResult add(ApiSystemparam apiSystemparam){
        return ss.adddata(apiSystemparam);
    }
    @RequestMapping("/update")
    public ResponseResult udata(ApiSystemparam apiSystemparam){
        return ss.updatadata(apiSystemparam);
    }
}
